﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdmDeviceList.aspx.cs"
    Inherits="LMS.SMSH.WEB.AdmDeviceList" MaintainScrollPositionOnPostback="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>设备信息管理</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div align="center">
        <table width="700" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="30" align="left" style="width: 120px">
                    &nbsp;&nbsp;<strong>设备信息管理</strong>
                </td>
                <td height="30" align="right" style="width: 580px">
                    <font size="2">设备名称<asp:TextBox ID="txtDeviceName" runat="server" Columns="6" MaxLength="50"
                        Width="130px"></asp:TextBox>制造厂<asp:TextBox ID="txtDevVender" runat="server" Columns="6"
                            MaxLength="50" Width="130px"></asp:TextBox></font>&nbsp;<asp:Button ID="btnFind"
                                runat="server" OnClick="btnFind_Click" Text="搜 索" />
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text="新 增" />
                    &nbsp;&nbsp; &nbsp;
                </td>
            </tr>
            <tr>
                <td height="30" colspan="2" align="left">
                    <div style="text-align: center">
                        <table border="0" style="width: 700px">
                            <tr>
                                <td colspan="3">
                                    成都大学实验室设备表
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    使用单位：自动控制实验室
                                </td>
                                <td>
                                    总金额：<asp:Label ID="lbldevtotalCost" runat="server" Text="<%#totalCost%>"></asp:Label>
                                </td>
                                <td>
                                    总台数：<asp:Label ID="lbltotalDevCount" runat="server" Text="<%#totalDevCount%>"></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:GridView ID="gvDeviceInfo" runat="server" AutoGenerateColumns="False" BorderColor="Black"
                                Width="700px" AllowPaging="True" OnPageIndexChanging="gvDeviceInfo_PageIndexChanging"
                                OnRowDataBound="gvDeviceInfo_RowDataBound" PageSize="6">
                                <RowStyle BackColor="Orange" Font-Size="Small" />
                                <Columns>
                                    <asp:TemplateField HeaderText="行编号">
                                        <HeaderStyle HorizontalAlign="Center" Width="6%" />
                                        <ItemStyle HorizontalAlign="Center" Width="6%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="全选">
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="chkHeader" runat="server" Text="全选" AutoPostBack="true" OnCheckedChanged="chkHeader_CheckedChanged" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkItem" runat="server" Text="" AutoPostBack="true" TextAlign="Left" />
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="6%" />
                                        <ItemStyle HorizontalAlign="Center" Width="6" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="devId" HeaderText="设备编号">
                                        <HeaderStyle HorizontalAlign="Center" Width="8%" />
                                        <ItemStyle HorizontalAlign="Center" Width="8%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="devName" HeaderText="设备名称">
                                        <HeaderStyle HorizontalAlign="Center" Width="11%" />
                                        <ItemStyle HorizontalAlign="Center" Width="11%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="devVender" HeaderText="制造厂家">
                                        <HeaderStyle HorizontalAlign="Center" Width="11%" />
                                        <ItemStyle HorizontalAlign="Center" Width="11%" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="购置日期">
                                        <HeaderStyle HorizontalAlign="Center" Width="7%" />
                                        <ItemStyle HorizontalAlign="Center" Width="7%" />
                                        <ItemTemplate>
                                            <%#Eval("devBoughtTime", "{0:yyyy-MM-dd}")%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="devCost" HeaderText="单价(￥)">
                                        <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="devStatus" HeaderText="设备现状">
                                        <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="devAtachment" HeaderText="附件数量">
                                        <HeaderStyle HorizontalAlign="Center" Width="4%" />
                                        <ItemStyle HorizontalAlign="Center" Width="4%" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="删除">
                                        <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                        <ItemTemplate>
                                            <asp:Button ID="btnMyDelete" runat="server" CommandArgument='<%#Eval("devId")%>'
                                                CommandName="myDelete" Text="删除" OnClick="btnMyDelete_Click" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle BackColor="OrangeRed" />
                                <AlternatingRowStyle BackColor="NavajoWhite" />
                                <PagerSettings FirstPageText="第一页" LastPageText="最后一页" Mode="NextPreviousFirstLast"
                                    NextPageText="下一页" PreviousPageText="上一页" />
                                <PagerStyle BackColor="#FFC080" Font-Size="Small" Font-Strikeout="False" Font-Underline="False"
                                    ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Top" />
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
